#!/usr/bin/env bash

mvn package


#curl -XPOST -vu admin:password http://art.local:8081/artifactory/ui/jcr/eula/accept

##使用阿里云

#docker build -t registry.cn-hangzhou.aliyuncs.com/smf-dev/dev:1.0.0 .

#docker push registry.cn-hangzhou.aliyuncs.com/smf-dev/dev:notebook-service-1.0.0


#⚠️登录jcr(#使用127.0.0.1:9081 localhost:9081登录,不要使用ip:9081 或者是hosts配置的域名登录)
#docker login --username=admin --password=Helm123456 127.0.0.1:9081



#使用127.0.0.1:9081 localhost:9081进行打包

#docker build -t 127.0.0.1:9081/docker/notebook-k8s/notebook-service:0.0.4 .

#docker push 127.0.0.1:9081/docker/notebook-k8s/notebook-service:0.0.4

#docker pull 127.0.0.1:9081/docker/notebook-k8s/notebook-service:0.0.4


#使用192.168.31.35:9081 localhost:9081进行打包
# -t 打tag
# 当前脚本下一定要有Dockerfile
docker build -t 192.168.31.35:9081/docker/notebook-k8s/notebook-service:latest .

docker push 192.168.31.35:9081/docker/notebook-k8s/notebook-service:latest

chmod +x ./buildAndPushImage.sh

#docker pull 192.168.31.35:9081/docker/notebook-k8s/notebook-service:latest

